package com.studynotes.dev.tech.model.dto.dataSourceLinkConfig;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author Liu XiaoJun
 * @description: 数据源链接配置新增数据传输对象
 * @date 2025-11-07 11:19:11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@Schema(name = "DataSourceLinkConfigCreateDTO", description ="数据源链接配置新增数据传输对象")
public class DataSourceLinkConfigCreate implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * Spring注入DS的ID
     */
    @NotEmpty
    @Schema(name = "dbLinkKey", requiredMode = Schema.RequiredMode.REQUIRED, description = "Spring注入DS的ID")
    private String dbLinkKey;

    /**
     * 链接名称
     */
    @NotEmpty
    @Schema(name = "dbLinkName", description = "链接名称")
    private String dbLinkName;

    /**
     * 数据库类型：0、mysql 1、postgresql 2、sqlserver 3、oracle  4、db2
     */
    @NotEmpty
    @Schema(name = "dbType", description = "数据库类型：0、mysql 1、postgresql 2、sqlserver 3、oracle  4、db2")
    private String dbType;

    /**
     * 数据库URL
     */
    @NotEmpty
    @Schema(name = "dbUrl", description = "数据库URL")
    private String dbUrl;

    /**
     * 数据库用户
     */
    @NotEmpty
    @Schema(name = "dbUser", description = "数据库用户")
    private String dbUser;

    /**
     * 数据库密码
     */
    @NotEmpty
    @Schema(name = "dbPass", description = "数据库密码")
    private String dbPass;

    /**
     * 显示序号
     */
    @Schema(name = "displaySeq", description = "显示序号")
    private Integer displaySeq;

    /**
     * 数据库模式
     */
    @Schema(name = "dbSchema", description = "数据库模式")
    private String dbSchema;

    /**
     * 标志位：0、禁用 1、正常 2、删除
     */
    @Schema(name = "flag", description = "标志位：0、禁用 1、正常 2、删除")
    private String flag;

}
